import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import util.Param;
import util.Sth;
import util.annotation.Check;
import util.MyService;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/spring.xml" })
public class Main {

    @Autowired
    MyService myService;
    @Test
    public  void test1() {
        Param param =new Param();
        param.setType("001");
        param.setName(":");
        param.setAge(140);
        try {
            myService.aa(param);
        }catch(Exception e){
            e.printStackTrace();
        }
    }
    @Check(name = "哈哈")
    private void haha(){

    }

    @Test
    public void testPrimitive(){
        System.out.println(int.class.isPrimitive());
        Integer i = 5;
        System.out.println(i.getClass().isPrimitive());
        System.out.println(Main.class.isPrimitive());
    }
    @Test
    public void testStream(){
        List<Object> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        System.out.println(list.stream().filter(e->(!e.equals("a"))).collect(Collectors.toList()));
    }
}
